package bag.services;

import bag.dao.UserDao;
import bag.domain.User;

import java.sql.SQLException;

/**
 * Created by 冷 on 2017/9/29.
 */
public class UserService {
    public User findByUsernameAndPassword(String uname, String pword) throws SQLException {
        UserDao dao = new UserDao();
        User user = dao.findUsernameAndPassword(uname,pword);
        return user;
    }
    public boolean addUsernameAndPassword(User user ) throws SQLException {
        UserDao dao = new UserDao();
        boolean user1 = dao.addUsernameAndPassword(user);
        return user1;
    }
}
